<template>
	<view class="ShiPing">
		<video id="myVideo" src="../../static/zanbi.mp4" autoplay muted loop controls="false"></video>
		
	</view>
</template>

<script>
	export default {
		data(){
			return{
				
			}
		},
		onShow() {
			 uni.createVideoContext('myVideo').play();
			 //切换出去 进来播放
		},
		onReady() {
			setTimeout(()=>{
				//getSubNVueById 仅支持app平台
				const subNvue = uni.getSubNVueById('wang');
				subNvue.show('none',0,()=>{
					console.log('subNVue 原生子窗体显示成功');
				})
			},500)
			
		}
	}
</script>

<style lang="scss" scoped>
	// 视频
	.ShiPing {
		width: 100%;
		height: 100%;
		background-color: aqua;
		position: fixed;
		z-index: 100;	
		video {
			width: 100%;
			height: 100%;
		}
	}
</style>